package com.example.adminbase.web;

import com.example.adminbase.dao.SysUserMapper;
import com.example.adminbase.domain.BusinessException;
import com.example.adminbase.domain.SysUser;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BaseController {
    private final SysUserMapper sysUserMapper;
    @Autowired
    public BaseController(SysUserMapper sysUserMapper) {
        this.sysUserMapper = sysUserMapper;
    }

    @GetMapping("user/get")
    public List<SysUser> get() {
//        return sysUserMapper.findAll();\
        throw new BusinessException(new RuntimeException(), "不支持该方法");
    }

}
